* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: backgroundShift 10s ease-in-out infinite alternate;
}

@keyframes backgroundShift {
    0% { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
    100% { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
}

.screen {
    display: none;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.screen.active {
    display: block;
}

/* 认证界面样式 */
.auth-container {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    text-align: center;
    max-width: 400px;
    margin: 0 auto;
}

.auth-container h1 {
    color: #333;
    margin-bottom: 30px;
    font-size: 2em;
}

.switch-auth {
    margin-top: 15px;
    color: #666;
}

.switch-auth a {
    color: #667eea;
    text-decoration: none;
}

.switch-auth a:hover {
    text-decoration: underline;
}

.admin-hint {
    margin-top: 20px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
    font-size: 12px;
    color: #666;
}

#login-form, #register-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#login-form input, #register-form input {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

#login-form input:focus, #register-form input:focus {
    outline: none;
    border-color: #667eea;
}

#login-form button, #register-form button {
    padding: 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

#login-form button:hover, #register-form button:hover {
    background: #5a6fd8;
}

.hint {
    margin-top: 15px;
    color: #666;
    font-size: 14px;
}

/* 游戏菜单样式 */
.menu-container {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.user-actions {
    display: flex;
    gap: 10px;
}

.role-badge {
    background: #667eea;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin-left: 8px;
}

.role-badge.admin {
    background: #dc3545;
}

.admin-btn {
    padding: 8px 16px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#logout-btn {
    padding: 8px 16px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.menu-container h2 {
    text-align: center;
    color: #2C3E50;
    margin-bottom: 10px;
    font-size: 2.2em;
    font-weight: 600;
}

.menu-subtitle {
    text-align: center;
    color: #7F8C8D;
    margin-bottom: 40px;
    font-size: 1.1em;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.game-card {
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    border: none;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.game-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.game-card:hover::before {
    left: 100%;
}

.game-icon {
    font-size: 3em;
    margin-bottom: 15px;
    display: block;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.game-card h3 {
    color: #2C3E50;
    margin: 10px 0;
    font-size: 1.3em;
    font-weight: 600;
}

.game-card p {
    color: #7F8C8D;
    margin-bottom: 20px;
    font-size: 0.9em;
    line-height: 1.4;
    flex-grow: 1;
    display: flex;
    align-items: center;
}

.game-card button {
    padding: 12px 25px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.game-card button:hover {
    background: linear-gradient(45deg, #764ba2, #667eea);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* 游戏界面样式 */
.game-container {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.game-header h2 {
    color: #333;
}

.score {
    font-weight: bold;
    color: #667eea;
}

#back-to-menu, #back-to-menu-admin {
    padding: 8px 16px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.game-area {
    display: flex;
    gap: 20px;
    justify-content: center;
}

#tetris-canvas {
    border: 2px solid #333;
    background: #000;
}

.game-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 150px;
}

.next-piece {
    text-align: center;
}

.next-piece h4 {
    margin-bottom: 10px;
    color: #333;
}

#next-canvas {
    border: 1px solid #ccc;
    background: #000;
}

.controls {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
}

.controls h4 {
    margin-bottom: 10px;
    color: #333;
}

.controls p {
    margin: 5px 0;
    color: #666;
    font-size: 14px;
}

.game-info button {
    padding: 10px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin: 5px 0;
}

.game-info button:hover {
    background: #218838;
}

#pause-game {
    background: #ffc107;
    color: #333;
}

#pause-game:hover {
    background: #e0a800;
}

/* 管理员面板样式 */
.admin-container {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    max-width: 1000px;
    margin: 0 auto;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.admin-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.tab-btn.active {
    border-bottom-color: #667eea;
    color: #667eea;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.users-list {
    overflow-x: auto;
}

#users-table, #leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

#users-table th, #users-table td,
#leaderboard-table th, #leaderboard-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

#users-table th, #leaderboard-table th {
    background: #f8f9fa;
    font-weight: bold;
}

.status-active {
    color: #28a745;
    font-weight: bold;
}

.status-inactive {
    color: #dc3545;
    font-weight: bold;
}

.action-btn {
    padding: 4px 8px;
    margin: 0 2px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.toggle-btn {
    background: #ffc107;
    color: #333;
}

.delete-btn {
    background: #dc3545;
    color: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #e9ecef;
}

.stat-card h4 {
    margin-bottom: 10px;
    color: #666;
}

.stat-value {
    font-size: 2em;
    font-weight: bold;
    color: #667eea;
}

.leaderboard {
    margin-top: 20px;
}

.game-stats {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
}

.game-stats p {
    margin: 5px 0;
    color: #333;
}

/* 消息提示样式 */
.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 5px;
    color: white;
    font-weight: bold;
    z-index: 1000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.message.show {
    transform: translateX(0);
}

.message.success {
    background: #28a745;
}

.message.error {
    background: #dc3545;
}

.message.info {
    background: #17a2b8;
}/* 消消
乐游戏样式 */
#match3-canvas {
    border: 2px solid #333;
    background: #2C3E50;
    cursor: pointer;
}

/* 扫雷游戏样式 */
.minesweeper-board {
    display: grid;
    gap: 1px;
    background: #999;
    border: 2px solid #333;
    padding: 10px;
    justify-content: center;
}

.mine-cell {
    width: 25px;
    height: 25px;
    background: #c0c0c0;
    border: 2px outset #c0c0c0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    position: relative;
}

.mine-cell:hover {
    background: #d0d0d0;
}

.mine-cell.revealed {
    background: #e0e0e0;
    border: 1px solid #999;
    cursor: default;
}

.mine-cell.flagged {
    background: #ffff99;
}

.mine-cell.mine {
    background: #ff6b6b;
}

.mine-cell.number-1 { color: #0000ff; }
.mine-cell.number-2 { color: #008000; }
.mine-cell.number-3 { color: #ff0000; }
.mine-cell.number-4 { color: #000080; }
.mine-cell.number-5 { color: #800000; }
.mine-cell.number-6 { color: #008080; }
.mine-cell.number-7 { color: #000000; }
.mine-cell.number-8 { color: #808080; }

.mine-cell.wrong-flag {
    background: #ff9999 !important;
}

.mine-cell.wrong-flag::after {
    content: '❌';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
}

.difficulty-selector {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
}

.difficulty-selector h4 {
    margin-bottom: 10px;
    color: #333;
}

.difficulty-btn {
    display: block;
    width: 100%;
    padding: 8px;
    margin: 5px 0;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
}

.difficulty-btn:hover {
    border-color: #667eea;
}

.difficulty-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* 游戏网格布局调整 */
.game-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    max-width: 900px;
    margin: 0 auto;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .game-area {
        flex-direction: column;
        align-items: center;
    }
    
    .game-info {
        min-width: auto;
        width: 100%;
        max-width: 300px;
        margin-top: 20px;
    }
    
    #match3-canvas {
        width: 100%;
        max-width: 400px;
        height: auto;
    }
    
    .minesweeper-board {
        transform: scale(0.8);
        transform-origin: center;
    }
}/* 贪吃蛇游戏样式 
*/
#snake-canvas {
    border: 3px solid #2C3E50;
    border-radius: 10px;
    background: #2C3E50;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

/* 飞翔小鸟游戏样式 */
#flappy-canvas {
    border: 3px solid #3498DB;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

/* 记忆翻牌游戏样式 */
.memory-game-container {
    max-width: 1200px;
    margin: 0 auto;
}

.memory-controls-top {
    background: rgba(255,255,255,0.95);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.memory-stats-row {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 20px;
}

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    color: #7F8C8D;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    color: #2C3E50;
    font-size: 1.5em;
    font-weight: bold;
}

.difficulty-selector h4 {
    text-align: center;
    color: #2C3E50;
    margin-bottom: 15px;
}

.difficulty-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.memory-game-area {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.memory-board-container {
    flex: 1;
    display: flex;
    justify-content: center;
}

.memory-board {
    display: grid;
    gap: 8px;
    padding: 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    max-width: 500px;
}

.memory-side-panel {
    width: 280px;
    flex-shrink: 0;
}

.memory-card {
    aspect-ratio: 1;
    perspective: 1000px;
    cursor: pointer;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.memory-card.flipped .card-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border: 2px solid rgba(255,255,255,0.3);
}

.card-front {
    background: linear-gradient(145deg, #667eea, #764ba2);
    color: white;
    font-size: 2em;
}

.card-back {
    background: linear-gradient(145deg, #f093fb, #f5576c);
    color: white;
    transform: rotateY(180deg);
    font-size: 2em;
}

.memory-card.matched .card-inner {
    transform: rotateY(180deg);
}

.memory-card.matched .card-back {
    background: linear-gradient(145deg, #27AE60, #229954);
    animation: pulse 0.5s ease-in-out;
}

@keyframes pulse {
    0% { transform: rotateY(180deg) scale(1); }
    50% { transform: rotateY(180deg) scale(1.1); }
    100% { transform: rotateY(180deg) scale(1); }
}

/* 记忆翻牌控制面板样式 */
.memory-side-panel .controls {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.memory-side-panel .controls h4 {
    color: #2C3E50;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.2em;
}

.control-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.control-item:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: translateX(5px);
}

.control-icon {
    font-size: 1.5em;
    margin-right: 15px;
    width: 30px;
    text-align: center;
}

.control-item span:last-child {
    color: #2C3E50;
    font-weight: 500;
}

.start-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(45deg, #27AE60, #2ECC71);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

/* 难度按钮样式优化 */
#memory-game .difficulty-btn {
    padding: 10px 15px;
    margin: 5px;
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border: 2px solid #E9ECEF;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    min-width: 100px;
}

#memory-game .difficulty-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

#memory-game .difficulty-btn.active {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* 游戏统计卡片美化 */
.game-stats {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.game-stats p {
    margin: 10px 0;
    color: #2C3E50;
    font-weight: 500;
}

/* 控制按钮美化 */
.game-info button {
    padding: 12px 20px;
    background: linear-gradient(45deg, #27AE60, #2ECC71);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    margin: 8px 0;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.game-info button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

#pause-game {
    background: linear-gradient(45deg, #F39C12, #E67E22);
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
}

#pause-game:hover {
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.4);
}

/* 难度选择按钮美化 */
.difficulty-btn {
    display: block;
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border: 2px solid #E9ECEF;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.difficulty-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.difficulty-btn.active {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* 消息提示美化 */
.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 10px;
    color: white;
    font-weight: bold;
    z-index: 1000;
    transform: translateX(400px);
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.message.show {
    transform: translateX(0);
}

.message.success {
    background: linear-gradient(45deg, #27AE60, #2ECC71);
}

.message.error {
    background: linear-gradient(45deg, #E74C3C, #C0392B);
}

.message.info {
    background: linear-gradient(45deg, #3498DB, #2980B9);
}

/* 游戏容器美化 */
.game-container {
    background: rgba(255,255,255,0.95);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    backdrop-filter: blur(10px);
}

/* 游戏头部美化 */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #E9ECEF;
}

.game-header h2 {
    color: #2C3E50;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.score {
    font-weight: bold;
    color: #667eea;
    font-size: 1.2em;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 返回按钮美化 */
#back-to-menu, #back-to-menu-admin, 
#back-to-menu-match3, #back-to-menu-minesweeper,
#back-to-menu-snake, #back-to-menu-flappy, #back-to-menu-memory {
    padding: 10px 20px;
    background: linear-gradient(45deg, #95A5A6, #7F8C8D);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(149, 165, 166, 0.3);
}

#back-to-menu:hover, #back-to-menu-admin:hover,
#back-to-menu-match3:hover, #back-to-menu-minesweeper:hover,
#back-to-menu-snake:hover, #back-to-menu-flappy:hover, #back-to-menu-memory:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(149, 165, 166, 0.4);
}

/* 响应式设计优化 */
@media (max-width: 1024px) {
    .game-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .game-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        max-width: 400px;
    }
    
    .game-card {
        padding: 20px;
    }
    
    .game-icon {
        font-size: 2.5em;
    }
    
    .game-area {
        flex-direction: column;
        align-items: center;
    }
    
    .game-info {
        min-width: auto;
        width: 100%;
        max-width: 350px;
        margin-top: 20px;
    }
    
    #match3-canvas, #snake-canvas, #flappy-canvas {
        max-width: 100%;
        height: auto;
    }
    
    .memory-board {
        max-width: 350px;
        margin: 0 auto;
    }
    
    /* 记忆翻牌响应式 */
    .memory-game-area {
        flex-direction: column;
        align-items: center;
    }
    
    .memory-side-panel {
        width: 100%;
        max-width: 400px;
        margin-top: 20px;
    }
    
    .memory-stats-row {
        gap: 20px;
    }
    
    .difficulty-buttons {
        justify-content: center;
    }
    
    #memory-game .difficulty-btn {
        min-width: 80px;
        font-size: 0.8em;
        padding: 8px 12px;
    }
    
    .control-item {
        margin-bottom: 10px;
        padding: 8px;
    }
    
    .control-icon {
        font-size: 1.2em;
        margin-right: 10px;
        width: 25px;
    }
}/* 
增强的管理员面板样式 */

/* 总览页面样式 */
.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.overview-card {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease;
}

.overview-card:hover {
    transform: translateY(-5px);
}

.card-icon {
    font-size: 3em;
    opacity: 0.8;
}

.users-card .card-icon { color: #3498DB; }
.games-card .card-icon { color: #E74C3C; }
.activity-card .card-icon { color: #27AE60; }

.card-content h4 {
    color: #2C3E50;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    color: #7F8C8D;
}

.stat-row span:last-child {
    font-weight: bold;
    color: #2C3E50;
}

.quick-stats {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.quick-stats h4 {
    color: #2C3E50;
    margin-bottom: 20px;
    text-align: center;
}

.today-best {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.best-item {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 10px;
}

.game-name {
    font-weight: 500;
    color: #2C3E50;
}

/* 用户管理增强样式 */
.users-controls {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    align-items: center;
}

.search-box {
    display: flex;
    flex: 1;
    max-width: 300px;
}

.search-box input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #E9ECEF;
    border-radius: 25px 0 0 25px;
    outline: none;
}

.search-box button {
    padding: 10px 15px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 0 25px 25px 0;
    cursor: pointer;
}

.filter-options select {
    padding: 10px 15px;
    border: 2px solid #E9ECEF;
    border-radius: 25px;
    background: white;
    cursor: pointer;
}

/* 游戏数据样式 */
.games-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.game-stat-card {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.game-stat-card:hover {
    transform: translateY(-5px);
}

.game-stat-card h4 {
    color: #2C3E50;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.3em;
}

.game-metrics {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.metric {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
}

.metric span:first-child {
    color: #7F8C8D;
}

.metric span:last-child {
    font-weight: bold;
    color: #2C3E50;
}

/* 排行榜样式 */
.leaderboard-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    justify-content: center;
}

.leaderboard-btn {
    padding: 10px 20px;
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border: 2px solid #E9ECEF;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.leaderboard-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.leaderboard-btn.active {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border-color: #667eea;
}

.leaderboard-content {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

/* 数据分析样式 */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.analytics-card {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.analytics-card h4 {
    color: #2C3E50;
    margin-bottom: 20px;
    text-align: center;
}

/* 活跃度图表 */
.activity-bars {
    display: flex;
    justify-content: space-around;
    align-items: end;
    height: 150px;
    padding: 20px 0;
}

.activity-bars .bar {
    width: 30px;
    background: linear-gradient(to top, #667eea, #764ba2);
    border-radius: 15px 15px 0 0;
    display: flex;
    align-items: end;
    justify-content: center;
    color: white;
    font-size: 0.8em;
    font-weight: bold;
    position: relative;
}

.activity-bars .bar span {
    position: absolute;
    bottom: -25px;
    color: #7F8C8D;
    font-size: 0.7em;
}

/* 游戏热度 */
.game-popularity, .time-distribution {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.popularity-item, .time-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.game-name, .time-range {
    min-width: 120px;
    font-size: 0.9em;
    color: #2C3E50;
}

.popularity-bar, .time-bar {
    flex: 1;
    height: 20px;
    background: #E9ECEF;
    border-radius: 10px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.percentage, .count {
    min-width: 40px;
    text-align: right;
    font-weight: bold;
    color: #2C3E50;
    font-size: 0.9em;
}

/* 健康度指标 */
.health-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.health-item {
    text-align: center;
    padding: 20px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 15px;
}

.metric-name {
    display: block;
    color: #7F8C8D;
    margin-bottom: 10px;
    font-size: 0.9em;
}

.metric-value {
    font-size: 2em;
    font-weight: bold;
    border-radius: 10px;
    padding: 10px;
}

.metric-value.excellent {
    background: linear-gradient(45deg, #27AE60, #2ECC71);
    color: white;
}

.metric-value.good {
    background: linear-gradient(45deg, #F39C12, #E67E22);
    color: white;
}

.metric-value.average {
    background: linear-gradient(45deg, #3498DB, #2980B9);
    color: white;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .overview-grid {
        grid-template-columns: 1fr;
    }
    
    .overview-card {
        flex-direction: column;
        text-align: center;
    }
    
    .users-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        max-width: none;
    }
    
    .games-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .leaderboard-selector {
        justify-content: center;
    }
    
    .leaderboard-btn {
        font-size: 0.8em;
        padding: 8px 15px;
    }
    
    .analytics-grid {
        grid-template-columns: 1fr;
    }
    
    .health-metrics {
        grid-template-columns: 1fr;
    }
}/
* 排行榜徽章样式 */
.rank-badge {
    display: inline-block;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: white;
    font-weight: bold;
    text-align: center;
    line-height: 30px;
    font-size: 0.9em;
}

.rank-badge.rank-1 {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.5);
}

.rank-badge.rank-2 {
    background: linear-gradient(45deg, #C0C0C0, #A9A9A9);
    box-shadow: 0 2px 10px rgba(192, 192, 192, 0.5);
}

.rank-badge.rank-3 {
    background: linear-gradient(45deg, #CD7F32, #B8860B);
    box-shadow: 0 2px 10px rgba(205, 127, 50, 0.5);
}